
function listimg(ops = {}) {
    let box = ops.recommandbox;
    let str = ``
    let imgs = []
    ajax("http://localhost:3000/getGoods", (res) => {
        res = JSON.parse(res).data;
        imgs = res;
        action()
    },false)
    function action(){
        for (let i = 0; i < imgs.length; i++) {
            let a = document.createElement("a");
            a.href = `http://localhost:3000/info.html?${imgs[i].Id}`;
            let img = document.createElement("div");
            img.className = "listimg";
            str = `<img src="${imgs[i].img_001}" alt="">`
            img.innerHTML = str
            let discribe = document.createElement("div");
            discribe.className = "discribe";
            let p1 = document.createElement("p");
            p1.className = "name"
            p1.innerHTML = imgs[i].info
            let p2 = document.createElement("p");
            p2.className = "price"
            p2.innerHTML = "&yen;" + imgs[i].price;
    
            box.appendChild(a)
            a.appendChild(img);
            a.appendChild(discribe);
            discribe.appendChild(p1);
            discribe.appendChild(p2);
        }
        for (let i = 0; i < imgs.length; i++) {
            let a = document.createElement("a");
            a.href = `http://localhost:3000/info.html?${imgs[i].Id}`;
            let img = document.createElement("div");
            img.className = "listimg";
            str = `<img src="${imgs[i].img_001}" alt="">`
            img.innerHTML = str
            let discribe = document.createElement("div");
            discribe.className = "discribe";
            let p1 = document.createElement("p");
            p1.className = "name"
            p1.innerHTML = imgs[i].info
            let p2 = document.createElement("p");
            p2.className = "price"
            p2.innerHTML = "&yen;" + imgs[i].price;
    
            box.appendChild(a)
            a.appendChild(img);
            a.appendChild(discribe);
            discribe.appendChild(p1);
            discribe.appendChild(p2);
        }
        for (let i = 0; i < imgs.length; i++) {
            let a = document.createElement("a");
            a.href = `http://localhost:3000/info.html?${imgs[i].Id}`;
            let img = document.createElement("div");
            img.className = "listimg";
            str = `<img src="${imgs[i].img_001}" alt="">`
            img.innerHTML = str
            let discribe = document.createElement("div");
            discribe.className = "discribe";
            let p1 = document.createElement("p");
            p1.className = "name"
            p1.innerHTML = imgs[i].info
            let p2 = document.createElement("p");
            p2.className = "price"
            p2.innerHTML = "&yen;" + imgs[i].price;
    
            box.appendChild(a)
            a.appendChild(img);
            a.appendChild(discribe);
            discribe.appendChild(p1);
            discribe.appendChild(p2);
        }
    }
}